<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  <div id="app">
      <com-a>
          <alert-msg>
              <h1>serious error</h1>
          </alert-msg>
      </com-a>
  </div>


  <template id="tmp">
      <div>
          <h1>msg</h1>
          <slot></slot>
      </div>
  </template>
  <script src="./vue.js"></script>
  <script>

        const comA = {
            template:"<div>我是局部组件COMA <slot></slot></div>"
        }

        const alertMsg= {
            template:"#tmp"
        }

    var vm = new Vue({
      el:'#app',
      data:{
      },
      methods:{
      },
      components:{
          comA,
          alertMsg
      }
     });
  </script>
</body>
</html>
